﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="CourtSchedule.aspx.cs" Inherits="badminton.DynamicData.CustomPages.CourtSchedule" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
	<tr>
		<td>
        球馆：
            <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" 
                onselectedindexchanged="OnHallChanged">
            </asp:DropDownList>&nbsp;
        球场：
            <asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True" 
                onselectedindexchanged="OnCourtChanged">
            </asp:DropDownList>
        </td>
	</tr>
    <tr>
        <td>
            <asp:GridView ID="GridView1" runat="server"  EnablePersistedSelection="True" AutoGenerateColumns="False"
                CssClass="DDGridView"
                RowStyle-CssClass="td" HeaderStyle-CssClass="th" CellPadding="6" 
                DataKeyNames="id">
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                           <asp:LinkButton ID="LinkButton2" runat="server" oncommand="OnRowCommand"  CommandArgument='<%# Eval("id")%>' CommandName="EditRow">编辑</asp:LinkButton>&nbsp;
                           <asp:LinkButton ID="LinkButton3" runat="server" oncommand="OnRowCommand"  CommandArgument='<%# Eval("id")%>' CommandName="DeleteRow" OnClientClick='return confirm("是否确实要删除此项?");'>删除</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:boundfield datafield="startTime" headertext="开始时间" />
                    <asp:boundfield datafield="endTime" headertext="结束时间" />
                    <asp:TemplateField HeaderText="使用类型">
                        <ItemTemplate>
                            <asp:Label ID="Label3" runat="server"  Text='<%# GetFiledValue(Eval("id"),"使用类型") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="备注">
                        <ItemTemplate>
                            <asp:Label ID="Label4" runat="server"  Text='<%#  GetFiledValue(Eval("id"),"备注")  %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="球场">
                        <ItemTemplate>
                            <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# GetFiledValue(Eval("id"),"球场")  %>'>球场</asp:HyperLink>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>

                <EmptyDataTemplate>
                    此表中当前没有项。
                </EmptyDataTemplate>

<HeaderStyle CssClass="th"></HeaderStyle>

<RowStyle CssClass="td"></RowStyle>
            </asp:GridView>
            <br/>
            <div class="DDBottomHyperLink">
                <asp:LinkButton ID="InsertHyperLink" runat="server" oncommand="OnRowCommand" CommandName="New"><img id="Img1" runat="server" src="~/DynamicData/Content/Images/plus.gif" alt="插入新项" />插入新项</asp:LinkButton>
            </div>
            <br/>

        </td>
    </tr>
    <tr>
        <td>
            <table border="0" cellspacing="0" class="DDDetailsTable" cellpadding="6" >
            	<tr class="td">
            		<td class="DDLightHeader">开始时间</td>
                    <td>
                        <asp:TextBox ID="TextStartTime" runat="server" CssClass="DDTextBox" Columns="20" ></asp:TextBox>
                        <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TextStartTime" Format="yyyy.MM.dd">
                        </ajaxToolkit:CalendarExtender>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="请输入" ControlToValidate="TextStartTime"/>
                 
                        <asp:DropDownList ID="DropDownListStartTimeHour"  runat="server">
                        </asp:DropDownList>
                        时 
                        <asp:DropDownList ID="DropDownListStartTimeMinute" runat="server" >
                        </asp:DropDownList>
                        分                    
                    </td>
            	</tr>
            	<tr class="td">
            		<td class="DDLightHeader">结束时间</td>
                    <td>
                        <asp:TextBox ID="TextEndTime" runat="server" CssClass="DDTextBox" Columns="20"></asp:TextBox>
                        <ajaxToolkit:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="TextEndTime" Format="yyyy.MM.dd">
                        </ajaxToolkit:CalendarExtender>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="请输入" ControlToValidate="TextEndTime"/>
                        
                        <asp:DropDownList ID="DropDownListEndTimeHour"  runat="server">
                        </asp:DropDownList>
                        时 
                        <asp:DropDownList ID="DropDownListEndTimeMinute" runat="server" >
                        </asp:DropDownList>
                        分                    
                    </td>
             	</tr>
            	<tr class="td">
            		<td class="DDLightHeader">使用类型</td>
                    <td>
                        <asp:DropDownList ID="DropDownListUserType" runat="server" >
                        </asp:DropDownList>
                     </td>
            	</tr>
            	<tr class="td">
            		<td class="DDLightHeader">备注</td><td>
                        <asp:TextBox ID="TextBox1" runat="server" Rows="5"></asp:TextBox></td>
            	</tr>
            	<tr class="td">
            		<td>
                        <asp:Label ID="LabelEditingId" runat="server" Visible="False"></asp:Label>
                        </td>
                        <td align="right">
                        <asp:LinkButton ID="LinkButtonEditOrNew" runat="server" oncommand="OnCreatSchedule" Text ="插入" CommandName="插入"/>
                        <asp:LinkButton ID="LinkButton4" runat="server" oncommand="OnCreatSchedule" CommandName="取消">取消</asp:LinkButton>
                        </td>
            	</tr>
            </table>
        </td>
    </tr>
</table>
</asp:Content>
